package com.wxzz.elearing.livetelecast.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wxzz.elearing.livetelecast.entity.LivetelecastCategory;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author
 * @since 2021-04-02
 */
public interface LivetelecastCategoryMapper extends BaseMapper<LivetelecastCategory> {

    /**
     * 查询二级分类
     * @param pid
     * @return
     */
    @Select("SELECT * FROM `livetelecast_category` WHERE pid = #{pid} AND deleted = 0 ORDER BY create_time DESC")
    List<LivetelecastCategory> listLivetelecastCategoryByPid(@Param("pid")Long pid);

}
